{%include file="header.html" %} 

<style>
	.link_tag a {
    border: 1px solid #E7E7E7;
    color: #6E6E6E;
    display: inline-block;
    height: 18px;
    line-height: 18px;
    margin: 7px 3px 0;
    padding: 0 6px;
	

	}
	.link_tag .cur{
	
	 background: none repeat scroll 0 0 #FE8F00;
    color: #FFFFFF;
    font-weight: bold;
    padding: 1px;
	}

	
	</style>


	<div id="page" class="view">
             {%include file="top.html" %} 
           {%include file="shadow.html" %} 
            
            <div class="wfx">
                <div class="CloseupLeft">
                    <div class="Board wfc " data-seq="11" data-id="1935826">
                      
                        {%include file="user/message/message_menu.html" %} 

					</div>
					<!--<div class="wfc topright promotions Board">
						
						<div class="reading-promotions">
							<h3>
								他还分享了
							</h3>
							<ul class="page1">
							{%section name=count loop=$g_show.list3%}
						<a {%if $g_show.list3[count].id == $g_show.topic_id%}class="cur"{%/if%} title="{%$g_show.list3[count].topic%}" href="?topic_id={%$g_show.list3[count].id%}">{%$g_show.list3[count].topic%}</a>
						{%/section%}
								
							</ul>
						</div>
						
					</div>-->
                </div>
                <div class="CloseupRight">
                    <div class="wt clearfix">
                        <div id="PinPinner">
                           
                         <!--  <ul class="pin-board-switcher clearfix">
                            <li class="first {%if $g_show.sex=='0'%}selected{%/if%}">
                                <a href="?topic_id={%$g_show.topic_id%}&sex=0">
                                   妹子求组队
                                </a>
                            </li>
                            <li class="last {%if $g_show.sex!='0'%}selected{%/if%}">
                                <a href="?topic_id={%$g_show.topic_id%}&sex=" class="pin-link ">
                                   所有人
                                </a>
                            </li>
							 <li class="last {%if $g_show.online=='1'%}selected{%/if%}">
                                <a href="?topic_id={%$g_show.topic_id%}&sex={%$g_show.sex%}&online={%if $g_show.online=='0'%}1{%/if%}" class="pin-link ">
                                  在线
                                </a>
                            </li>
						 </ul>-->
                          <h3>与  {%$g_show.to_user_info.name%} 对话列表</h3>
                        </div>
                      <div id="PinAddComment" data-id="33041272" class="clearfix">
							<div id="PinInputArea">
								
								<a title="" class="img x">
								{%if $g_show.current_user_info%}
									<img src="{%$g_show.current_user_info.user_pic1%}" class="avatar">
									{%else%}
									<img src="/images/user_icon/default/default_50.gif" class="avatar">
									{%/if%}
								</a>
								<div class="InputContainer Form FancyForm">
									<textarea autocomplete="off" id="CloseupComment" name="caption" maxlength=300
									default-value="发给 {%$g_show.to_user_info.name%} 的消息"
									></textarea>
									<ul style="display: none; z-index: 42; opacity: 0;" class="ac-choices">
									</ul>
									<label style="display: none;">
										添加评论或@好友
									</label>
									<span class="fff">
									</span>
								</div>
								<div id="PinAddCommentControls" style="display: block;">
									<a id="PostMblog" href="javascript:void(0);" onclick="return false;" class="btn btn13 wbtn">
										<strong>
											发消息
										</strong>
										<span>
										</span>
									</a>
								</div>
							</div>
						</div>
                        <div id="pin_comments">


						{%section name=count loop=$g_show.list%}
							
							{%if $g_show.current_user_info.uid == $g_show.list[count].from_uid%}
								<div class="comment clearfix">
								<div class="fr" id="comment_action_btns">
									
								</div>
								
									<img class="avatar" width=50 height=50 src="http://tp3.sinaimg.cn/{%$g_show.current_user_info.uid%}/50/5635936750/1">
								
								<p class="meta">
								
								
										{%$g_show.current_user_info.user_nickname%}

								
						
									&nbsp;-&nbsp;
									<span class="ts-words">
										{%$g_show.list[count].create_time%}
									</span>
									说：
								</p>
								<p class="text">
									{%$g_show.list[count].msg_content%}
								</p>

							</div>
							{%else%}
								<div class="comment clearfix" ">
								<div class="fr" id="comment_action_btns">
									
								</div>
								<a class="img x" title="" href="/user/?uid={%$g_show.to_user_info.id%}">
									<img class="avatar" width=50 height=50 src="http://tp3.sinaimg.cn/{%$g_show.to_user_info.id%}/50/5635936750/1">
								</a>
								<p class="meta">
								
									<a class="author" href="/user/?uid={%$g_show.to_user_info.id%}">
											{%$g_show.to_user_info.name%}

									</a>
						
									&nbsp;-&nbsp;
									<span class="ts-words">
										{%$g_show.list[count].create_time%}
									</span>
									说：
								</p>
								<p class="text">
									{%$g_show.list[count].msg_content%}
								</p>

							</div>
							{%/if%}
							


						{%/section%}


                        </div>
						<div class="page-v3" >{%$g_show.page_bar%}</div>
						<br>
                </div>
            </div>
            
        </div>
        <div class="clear">
        </div>
		<div class="sm-mask" style="display:none;"></div>   
<script type="text/x-jquery-tmpl" id="add_private_message"  >
<div id="add_private_message_div" style="position: absolute; z-index: 10001; top: 108px; left: 350px;"
node-type="outer" class="W_layer" stk-mask-key="135639283877681">
    <div class="bg">
        <table cellspacing="0" cellpadding="0" border="0">
            <tbody>
                <tr>
                    <td>
                        <div node-type="layoutContent" class="content">
                            <div node-type="title" class="title" style="cursor: move;">
                                <span node-type="title_content">
                                    发私信
                                </span>
                            </div>
                            <a node-type="close" title="关闭" class="W_close" id="close_poup_add_mblog" href="javascript:void(0);">
                            </a>
                            <div node-type="inner">
                                <div>
                                    <div node-type="outer" class="W_private_letter">
                                        <table class="form_private">
                                            <tbody>
                                                <tr>
                                                    <th>
                                                        发&nbsp;&nbsp;给：
                                                    </th>
                                                    <td>
                                                        ${nickname}
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <th>
                                                        内&nbsp;&nbsp;容：
                                                    </th>
                                                    <td node-type="uploadTd">
                                                        <p node-type="num" class="num" style="display: block;">
                                                            最多输入
                                                            <span>
                                                                300
                                                            </span>
                                                            字
                                                        </p>
                                                        <textarea node-type="textEl" name="" maxlength=300 id="add_private_message_content" class="W_no_outline" style="margin: 3px 0px 0px; padding: 3px; border-style: solid; border-width: 1px; font-size: 12px; font-family: Tahoma,宋体; word-wrap: break-word; line-height: 18px; overflow-y: auto; overflow-x: hidden; outline: medium none;"
                                                        range="0&amp;0"></textarea>
                                                        <div class="send_succpic" style="display: none;" node-type="successTip">
                                                        </div>
                                                       
                                                        <div class="btn_s fr">
                                                            <a action-type="submit" node-type="submit" value="${uid}" diss-data="module=msglayout"
                                                            href="javascript:void(0);" id="add_preivate_message_submit" class="W_btn_b btn_noloading">
                                                                <span>
                                                                    <b class="loading">
                                                                    </b>
                                                                    <em node-type="btnText">
                                                                        发送
                                                                    </em>
                                                                </span>
                                                            </a>
                                                        </div>
                                                        <ul fid="" style="display:none" node-type="uploadList" class="p_sendlist"
                                                        swfid="2609">
                                                        </ul>
                                                    </td>
                                                </tr>
                                            </tbody>
                                        </table>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
</div>
	
</script>


		{%include file="footer_js.html" %}    

		<script>

$(function(){
	
	
	$(".add_private_message").bind("click",function(e){
		
		YOUXIXIU.MAIN.CheckMessage.showdetail("33","test");
	})
	YOUXIXIU.MAIN.Tips.text_default_val("#CloseupComment");
	
	

		$("#PostMblog").die("click");
		$("#PostMblog").live("click",function(e){
			
			var content = $("#CloseupComment").val();
			var uid = "{%$g_show.to_uid%}";
			content = encodeURIComponent(content);
			$.getJSON("/interface/mblog/json_add_private_message.php?t=jsonp&content="+content+"&uid="+uid+"&callback=?", function(json){
			if(typeof(json)!='undefined')
			{

				if(json.error == 1)
				{
					YOUXIXIU.MAIN.Tips.Show(json.errmsg);
				}
				else
				{
				
					YOUXIXIU.MAIN.Tips.Show(json.errmsg);
					location.reload();
				}
				

				
			}
			
			
				
		});

		
	});




	$(".pinViewReplyButton").bind("click",function(e){

		var nick = "回复@"+ $(e.target).attr("data-name")+":";
		$("#CloseupComment").val(nick);
		
	})

	$(".DeleteComment").bind("click",function(e){
		
			var parent = $(this).parents(".comment");
			var id = parent.attr("data-id");
		
			$.getJSON("/interface/mblog/json_add_mblog_reply.php?t=jsonp&type=del&id="+id+"&callback=?", function(json){
			if(typeof(json)!='undefined')
			{

				if(json.error == 1)
				{
					YOUXIXIU.MAIN.Tips.Show(json.errmsg);
				}
				else
				{
				
					YOUXIXIU.MAIN.Tips.Show(json.errmsg);
					parent.hide();
					
						
				}
				

				
			}
			
			
		
			});
		});


	$(".pic_share").bind("click",function(e){
	
	var url = location.href;
	var title ="@{%$g_show.item.create_nickname%} 分享的图片太酷了，我很喜欢！"
	var pic = "{%$g_show.item.pic%}";
		window.open("http://service.weibo.com/share/share.php?pic="+pic+"&url="+url+"&title="+title+"&appkey=258339629");
	});



});
		


</script>
  {%include file="footer.html" %} 